home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / Visual Cafe Pro v1.0 / TUTORIAL.BIN / RowState.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-01-30  |  943 b   |  33 lines

  1. package symantec.itools.db.awt;
  2.  
  3. public class RowState {
  4.    int state;
  5.    public static final int CLEAN = 0;
  6.    public static final int NEW = 1;
  7.    public static final int MODIFIED = 2;
  8.    public static final int DELETED = 3;
  9.  
  10.    public int getState() {
  11.       return this.state;
  12.    }
  13.  
  14.    public void markClean() {
  15.       this.state = 0;
  16.    }
  17.  
  18.    public void markNew() {
  19.       this.state = 1;
  20.    }
  21.  
  22.    public void markModified() {
  23.       if (this.state != 1 || this.state != 3) {
  24.          this.state = 2;
  25.       }
  26.  
  27.    }
  28.  
  29.    public void markDeleted() {
  30.       this.state = 3;
  31.    }
  32. }
  33.